package edu.udo.sopra10.chaturaji.events;

/**
 * Game over event that is invoked when the current game terminates.
 * 
 * @author Patrick Westerhoff
 */
public class GameOverEvent extends ChaturajiEvent
{
	private static final long serialVersionUID = -416099006993274951L;
	
	private boolean aborted;
	
	/**
	 * Constructs a GameOverEvent that was aborted or regulary terminated.
	 * 
	 * @param source the source object.
	 * @param aborted if the game was aborted.
	 */
	public GameOverEvent ( Object source, boolean aborted )
	{
		super( source );
		
		this.aborted = aborted;
	}
	
	/**
	 * Constructs a GameOverEvent that was regulary terminated.
	 * 
	 * @param source the source object.
	 */
	public GameOverEvent ( Object source )
	{
		this( source, false );
	}
	
	/**
	 * Returns true if the game was aborted.
	 * 
	 * @return true if the game was aborted.
	 */
	public boolean isAborted ()
	{
		return aborted;
	}
}